mixin flash-g(tip)
  -var {url, width, height} = images[tip]

  g
    g.flash-animate
      foreignObject(x=`0`, y=`0`, width=width, height=height)
        svg(style=`background-image:url(https://cos.brandgo.cn/svg/table/31.png);background-repeat:no-repeat;background-size:100%;background-attachment:scroll;display:inline-block;
          background-position:0 0;width:100%;vertical-align:top;-webkit-tap-highlight-color:transparent;user-select:none`, 
          viewBox=`0 0 ${width} ${height}`, x=`0px`, y=`0px`)
      animate(attributeName=`opacity`, calcMode=`spline`, keySplines=`0.42 0 0.58 1.0; 0.42 0 0.58 1.0; 0.42 0 0.58 1.0; 0.42 0 0.58 1.0`, values=`0;1;0;1;0`, begin=`0`, dur=`2s`, repeatCount=`indefinite`)
    rect(opacity=`0`, fill=`#FFFFFF`, width=width, height=height, style=`pointer-events:painted`)
      animate(attributeName=`x`, begin=`click`, dur=`1ms`, values=`-100000`, fill=`freeze`, restart=`never`)
    set(attributeName=`visibility`, from=`visible`, to=`hidden`, begin=`click`)


